#include "Plant.h"

Plant::Plant()
{
}

Plant::~Plant()
{
}

void Plant::Initialize()
{
	WorldObject::Initialize();

	m_xSprite = m_xSpriteManager->LoadSprite("Images/Plant01.png", 1);
	m_xSprite->setOrigin(10.0f, 16.0f);

	m_eType = TypePlant;

	m_fLifeTime = rand() % 10 + 120;
	
}

void Plant::Cleanup()
{
	WorldObject::Cleanup();
}

void Plant::Update(float pDeltaTime)
{
	if (m_fLifeTime > 0.0f)
	{
		m_fLifeTime -= pDeltaTime;
		
	}
	else if (m_fLifeTime <= 0.0f)
	{
		m_bDelete = true;
	}

	WorldObject::Update(pDeltaTime);
}